<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="${ctx}/resources/layui/css/layui.css">
<link rel="stylesheet" href="${ctx}/resources/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="${ctx}/resources/layui_ext/dtree/font/dtreefont.css">
</head>
<body>
	<ul id="menuTree" class="dtree" data-id="0"></ul>
	<script src="${ctx}/resources/layui/layui.js"></script>
	<script type="text/javascript">
		var menuTree;
		var dtree;
		layui.extend({
			dtree:'${ctx}/resources/layui_ext/dist/dtree'
		}).use([ 'jquery', 'layer', 'form','dtree' ], function() {
			var $ = layui.jquery;
			var layer = layui.layer;
			var form = layui.form;
			dtree=layui.dtree;

			 // 初始化树
		    menuTree = dtree.render({
		      elem: "#menuTree",
 		      dataStyle: "layuiStyle",  //使用layui风格的数据格式
		      response:{message:"msg",statusCode:0},  //修改response中返回数据的定义
              dataFormat: "list",  //配置data的风格为list
              url: "${ctx}/menu/loadMenuManagerLeftTreeJson.action", // 使用url加载（可与data加载同时存在）
              method: 'post'
		    });
			
		    dtree.on("node('menuTree')" ,function(obj){
	    		var id = obj.param.nodeId
	    		window.parent.right.reloadTable(id)
	    	  
	    	});
		});
	</script>
</body>
</html>